package org.wlgzs.website.wlgzsoffice.util;

import lombok.Data;
import org.wlgzs.website.wlgzsoffice.enums.ResultEnum;


@Data
public class ResultMsg {

    /**
     * 状态码
     */
    private int code;
    /**
     * 状态信息
     */
    private String msg;
    /**
     * 返回数据
     */
    private Object data;


    public ResultMsg(ResultEnum resultEnum) {
        this.code = resultEnum.getCode();
        this.msg = resultEnum.getMsg();
    }

    public ResultMsg(ResultEnum resultEnum, Object data) {
        this(resultEnum);
        this.data = data;
    }
}
